package com.example.ojcodesandbox.demo;

import com.example.ojcodesandbox.impl.GoDockerCodeSandbox;
import com.example.ojcommon.common.ExecuteCodeRequest;

import java.util.ArrayList;

public class DEMO {
  public static void main(String[] args) {
    ExecuteCodeRequest request = new ExecuteCodeRequest();
    request.setQuestionId(1769702776721383426L);
    request.setSubmitId(1779795050302083074L);
    ArrayList<String> list = new ArrayList<>();
    list.add("1 2");
    request.setInputList(list);
    request.setLanguage(5);
    request.setCode("package main\n" +
        "\n" +
        "import \"fmt\"\n" +
        "\n" +
        "func main() {\n" +
        "    var a, b int\n" +
        "    fmt.Scanf(\"%d%d\", &a, &b)\n" +
        "    fmt.Println(a+b)\n" +
        "}");
//    JavaDockerCodeSandbox codeSandbox = new JavaDockerCodeSandbox();
    GoDockerCodeSandbox codeSandbox = new GoDockerCodeSandbox();
    codeSandbox.executeCode(request);
  }
}
